﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using HomeDmsUtils;

namespace HomeDms
{
    public partial class MailMessageForm : Form
    {
        public MailMessageForm()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                SendFileTo.MAPI mapi = new SendFileTo.MAPI();
                string[] recips = mapi.GetEmailsFromAddressBook(this);
                if (recips == null)
                    return;
                foreach (string recip in recips)
                    addressBox.Text += recip + "; ";
            }
            catch (Exception ex)
            {
                Localizer.MsgBox(this, ex.Message, "Simple MAPI Error",
                     MessageBoxButtons.OK, MessageBoxIcon.Error);
            }

        }
    }
}
